<?php
require_once('LinkFetcher.php');
$url = $_POST['url'];
$f = new LinkFetcher();
$data = array();
if($f->setUrl($url)){
	$data['ID'] = $f->getContentInformation();
	$data['title'] = $f->getTitle();
	$data['description'] = $f->getDescription();
	$data['images'] = $f->getPreviewImages();
}
echo json_encode($data);
